export const imageListToArray = list => {
    if(!list){
        return [];
    }
    return list.map(item => item.response.filename);
}

export const imageArrayToList = array => {
    if(!array){
        return [];
    }
    return array.map((item,index) => ({
        uid:'-' + index,
        name:item,
        response:{filename:item},
        status: 'done',
        url:'/api/images/'+item
    }));
}